﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Lamex.Library;
using Lamex.Interface;
using Lamex.Library.CommonClass;
using Lamex.Common;

namespace Lamex.mLabor.UI
{
    public partial class frmLBR_Main : frmModuleBase
    {
        public frmLBR_Main()
        {
            InitializeComponent();
            menuStrip1.Text = ModuleNames.mLabor; //与AssemblyModuleEntry.ModuleName定义相同
        }
        public override MenuStrip GetModuleMenu()
        {
            return this.menuStrip1;
        }

        private void menuLBR_WorkerList_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Workers_Info", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_LeaveRecord_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Leave_Record", 0, true, false), sender as ToolStripMenuItem);
        }

        private void menuLBR_WorkerLocation_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Location_Record", 0, true, false), sender as ToolStripMenuItem);
            //以下为新定位系统，待开发
            //MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmLBR_Worker_Location), sender as ToolStripMenuItem);
        }

        private void menuLBR_ShiftMgmt_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Work_ShiftRec", 1, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_StationInfo_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Station_Info", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_Non_Working_Time_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Non_Working_Time", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_Non_Working_Day_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Non_Working_Day", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_Process_Cycletime_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Process_Cycletime", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_Work_Barcode_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Work_Barcode", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_Line_Notice_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Line_Notice", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuLBR_Scan_Record_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Scan_Record", 0, false, false), sender as ToolStripMenuItem);
        }

        private void menuLBR_WorkTime_Analysis_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmLBR_LaborTime_Query), sender as ToolStripMenuItem);
        }

        private void menuLBR_WorkTime_Maintain_Click(object sender, EventArgs e)
        {
            //MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmLBR_LaborTime_Maintain), sender as ToolStripMenuItem);
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmLBR_LaborTime_Workstation), sender as ToolStripMenuItem);
        }

        private void menuLBR_nonWorkTime_List_Click(object sender, EventArgs e)
        {
            //MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmLBR_Calendar), sender as ToolStripMenuItem);        
        }

        private void menuLBR_OverTime_Apply_Click(object sender, EventArgs e)
        {
            // MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmLBR_LaborTime_Maintain), sender as ToolStripMenuItem);
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmLBR_WorkingTime_Planning), sender as ToolStripMenuItem);
        }

        private void menuLBR_OverTime_Approve_Click(object sender, EventArgs e)
        {

        }

        private void menuLBR_WorkTime_Confirm_Click(object sender, EventArgs e)
        {

        }

        private void menuLBR_WorkTime_Approve_Click(object sender, EventArgs e)
        {

        }

        private void menuLBR_WorkTime_Workstation_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("HR_Work_Hours_Workstation", 0, true, false), sender as ToolStripMenuItem);
        }

    }
}